package com.lin.exception.handler;

import com.lin.entity.R;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@ControllerAdvice
public class GlobalException {
    @ExceptionHandler(value = Exception.class)
    public R exceptionHandler(Exception e) {
        return R.failed("服务器内部错误, 请稍后重试", e);
    }
}
